//
//  PASenTestCase.m
//  MissPaparazzi
//
//  Created by Denis Liger on 8/30/12.
//  Copyright (c) 2012 Pr-App.com. All rights reserved.
//

#import "PASenTestCaseAsync.h"

@implementation PASenTestCaseAsync

- (BOOL)waitForCompletion:(NSTimeInterval)timeoutSecs
{
    NSDate *timeoutDate = [NSDate dateWithTimeIntervalSinceNow:timeoutSecs];
    
    do {
        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:timeoutDate];
        if([timeoutDate timeIntervalSinceNow] < 0.0)
            break;
    }
    while (!done);
    
    return done;
}

@end
